package cn.com.lyb.core.exception;

public class BizException extends RuntimeException {

    private IBizException iBizException;

    private String code;

    private String message;


    public BizException(String message, Throwable cause) {
        super(message, cause);
        this.message = message;
    }

    public BizException(String message) {
        this.message = message;
    }

    public BizException(String message, String code) {
        this.code = code;
        this.message = message;
    }


    public BizException(IBizException iBizException) {
        super();
        this.iBizException = iBizException;
        this.code = iBizException.getCode();
        this.message = iBizException.getMessage();
    }

    public BizException(IBizException iBizException, Throwable cause) {
        super(cause);
        this.iBizException = iBizException;
        this.code = iBizException.getCode();
        this.message = iBizException.getMessage();

    }

    public IBizException getiBizException() {
        return iBizException;
    }

    public String getCode() {
        return code;
    }

    public void setCode(String code) {
        this.code = code;
    }

    public String getMessage() {
        return message;
    }

    public void setMessage(String message) {
        this.message = message;
    }

}
